package com.csdn.eval.spring.mqtt.demo.listener;


import com.csdn.eval.spring.mqtt.annotation.MqttEventListener;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class DemoListener {

    @MqttEventListener(topic = "hello/+", eventType = String.class)
    public void onMessage(String topic, String messageData) {
        log.info(">>>> DemoListener received message: topic={}, messageData={}", topic, messageData);
    }

}
